set nocompatible
set number
set rnu
set nu
set shiftwidth=4
set tabstop=4
filetype plugin indent on
set cindent
set smartindent
set nofoldenable
set foldmethod=indent
syntax on
syntax enable
set noexpandtab
color darkblue
"colorscheme monokai
"colorscheme molokai
"color desert
set backspace=indent,eol,start
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set hlsearch
set autochdir
set directory=~/.vim/swp/

"set guifont=YaHei\ Consolas\ Hybrid:h12
set guicursor=n-v-c:block-Cursor

set guioptions-=m	" hide menu bar
set guioptions-=T	" hide toolbar

map <silent><F2> :if &guioptions =~# 'T' <Bar>
		\set guioptions-=T <Bar>
		\set guioptions-=m <Bar>
	\else <Bar>
		\set guioptions+=T <Bar>
		\set guioptions+=m <Bar>
	\endif<CR>

set guioptions=egt

" 切换到普通模式，切换输入法到英文状态
augroup imeauto
autocmd!
autocmd! InsertLeave * set imdisable|set iminsert=0
autocmd! InsertEnter * set noimdisable|set iminsert=0
augroup END

" 警告静音
set vb t_vb=

" events
map <silent><C-K><C-B> :if NERDTree.IsOpen() == 1 <Bar>
	\NERDTreeToggle<Bar>
	\else<Bar>
	\NERDTree<Bar>
	\endif<CR>

" plugins
let NERDTreeAutoCenter=1
let NERDTreeShowLineNumbers=1
let NERDTreeShowHidden=0
let NERDTreeWinSize=25
let g:nerdtree_tabs_open_on_console_startup=1

